package io.nuls.test.storage;

import com.fasterxml.jackson.core.JsonProcessingException;
import io.nuls.core.exception.NulsException;
import io.nuls.core.parse.JSONUtils;
import io.nuls.core.rockdb.service.RocksDBService;
import io.nuls.poc.model.po.AgentPo;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AgentDBOperator {
    public static void main1(String[] args) throws NulsException, JsonProcessingException {
        RocksDBService.init("/Users/niels/Downloads/testspace/cs04");
        List<byte[]> list = RocksDBService.valueList("consensus_agent1");
        Map<String, Long> map = new HashMap<>();
        for (byte[] arr : list) {
            AgentPo po = new AgentPo();
            po.parse(arr, 0);
            map.put(po.getHash().toHex(), po.getDelHeight());
        }
        System.out.println(JSONUtils.obj2json(map));
    }

    public static void mai2n(String[] args) throws IOException, NulsException {
        Map<String, Object> map = JSONUtils.json2map("{\"39a23232daf07c454b35334d780ea62e4921f913b5957b09ea9a0439c7afbeb4\":8084054,\"476fc57f878b87d46fad60ffbb0a65fb13fe5b8cffee552eafcd93f000598417\":4577154,\"0bc2090273f9afddcbe842c19ae33d94bfbae911801d7f6d6181bbf806eca895\":8083944,\"7756e4bdef3a6e8ba25b62ad89221f427e595bf8eaa487ca2239ea09aecede6f\":5201198,\"3a822becde6ce8717994f642a68ef7e8f8a03cd367388f1695974e596e50c731\":-1,\"5777788b23636972ff7a97ebe459203d793936f44a5e13b9ab875b61499e260b\":11415,\"b1716a2798e8386e3f0129b0dad13ce750cc3592fa499e2baa8832985d5b94c2\":3286416,\"27d38bfc8dcf334a0585954ff0c392f51aaa33c22fd406e87ec872783c04fa46\":242357,\"8a32c0680ca654fde91d6019c2b50e44d43ecee9cb695c7fb29dd226b1941069\":-1,\"7b31d8917ecacde46b9cf9240d2fd519e3ca32f6f6780893b5e360f2ddf3d006\":1124836,\"74fc0451b1acd01e1e659887f0c87bf710fce5ca48a757f26dc5acd5326df274\":3303203,\"2ded4339a4fe30fe850288c88b5513d22c20d39838c07b2ae4eaae30a78e5c48\":-1,\"de909bf3550982b5b2a38f1d53c672904f49f9c5fd062c73b3ff7fef566b9e1f\":4683765,\"7d4e00de34691967f86217949da8d32ef6df872894149b792d10df3b29121b03\":2740119,\"ef4ec040a5a8ee4cc7ccbd0fe74a06d037c0689f7899441835cd5d0e752b26c7\":2922041,\"651601e9afa22596c45d2d65da30c48978526b89c845951c8bfd14e9ac59bf16\":9635,\"ee11a0f2a2f79a798087272a55878bca28cefa590303ee56c62e59536ce14570\":3686256,\"65a645787cc9f9b1e3300701959456a3b698240c780cd4a15dd2f33f699b8787\":3286413,\"71da6961070df067726dccdc2673d5da95b550f3d220ba9da0fefb0d74d68cfb\":-1,\"c19867200e3c00bdcd915f61c95ca9189930858f0ee05ea619425bd2dd3fbdc8\":2758586,\"2b1751d56964794fc7585b598cc35eeb5c4a9dda17d0827e309f7d9b0afe9f46\":-1,\"dc3d3248fe8d5ddeadd145e1a71566be2d4da0f48168da5de4194abd2158e9f3\":3530151,\"182bb5675bc3aed268e99f81d7ede9323d2acce347137a5ba37ce0586abfca82\":5027461,\"697643b571bea4e51dd7fa562ce0d86121c7af4181501e961f0dbc7a97af6216\":8083963,\"85e30d81eab45f5cc382e7037c1d4eaa60d64ac228de752dd0ea8ec45443014e\":-1,\"2a46b67555c815307369416c8821f0359cfbb6aa255344ceac4eb072a1a2a12f\":-1,\"bafa1c2fb34f31edaed167a197057cd474d0831362680023d9cb8a2f126465e0\":6047420,\"0d9b4d21d6a2aa5dfb3695f71a275916be5674b1398a487f10fab0c976baf90d\":3751982,\"b96b689db12ae1976be4ed83f5e78fbb75bdbd5ccb1853c2baf31cf119228ac3\":5206441,\"737ff49165ed899693247fcd9a5d157073d7fb48fca27641eb01a60b17a680c2\":6833125,\"89f89723e9293e39a0b00f14e9fbe8059223b2553eba303ead67394dc5272dc7\":1751368,\"230cac7e0871c20b51f011e5a2b1ba96607d849c5395a7beb47f806b8c4f4f05\":8083949,\"5afde946b6977a4d9b168913530b48dd3df65b640f3441af6b1247b53fc43138\":2542550,\"dd2da63f45b1a4119e0eccac2d7e756e1dc86551b8238edc5069960bf682fc7c\":6906192,\"423735d1451bcab64122b3145d969c334f78ddec9be4db2e2e3abffb413f8c3e\":-1,\"1df5e3b966fc192613682cb493f5938d710dff9096df4e376f544723606d7782\":4031677,\"5820c4e21dcf018751e2b28b223a980a08906c1ead6edb9c02f003fbe3af4ae8\":2154418,\"aed3ab57cd571ecd93deece1fde39fef50bf37670e7e6b566846379ba25c075e\":-1,\"ab00e76ba14fdc1e14dc1a3c7d86e9751de81fa0dfa98c98b5f236f6638a3cc0\":-1,\"bf1d130b307f9fc1e50177f5111699bfbe5854a58980043502dd66872f1f5ad5\":3693340,\"f3eb83dcd184fe80c7e57adf63c329957f9289f90154df437c54ec2c99521305\":-1,\"389d4a4a9d16dfd3b8a4608f87a9db552da37c18def18b0353d3326f5fc222bb\":-1,\"4df16d1272ab18f3de446af40b6e0da862c608053aa2bcbd35833923645bde4d\":2307906,\"5c5e8a8b24f9ee90a6b9c74a7a64ce50c1f3813998fc474f6d908907b762662c\":358925,\"499d3e9eede759921e30ff4d74ae6ed72cbbb634180a3db7ca4e25eb2b554f9e\":5014272,\"4470d7793ae11dc58336ea5cc69fa2a28c26387b8d234d74a92c0ad81735cd96\":4277142,\"9b684aa73433c26fb9d374ecf1280b472e9b2a52ee34905d7a93965db7b0eb8c\":4251025,\"a92ac22f4e3686a594be6558f46400d889b3832fe776fbf5e705307005fa865a\":-1,\"ab312a0abb74def8cd15dd4409744a50be610fe294ca6a819aa200d577d9644b\":3726969,\"bb997bf54560bb384f2c25a48865ce3b88c8ad5b7f3775a2110cbefcec83e2a9\":2910708,\"e352b3cbdf4b94c34b3ef57a1ea8df14091f1756a23465527220aa6fc8ce96b6\":6019726,\"6460d634470a62b9b50f3d0e4c7df396c40de82a9fd4de94449101dff586bf39\":7079825,\"e3e98fd2691a70da3ee618d0e237f36311c38842c256584bd26bf667700f978b\":-1,\"e8e7d91dbd0b55c443c38daa7901c1669f1a5f062daabc9f50b9fc1ffb9e52ef\":-1,\"24b63ec9edfe2692bf7ef2751bd6254db63768bdca50d6ac45303db70617d5ba\":7607455,\"45f5c09a6996f7b023ade1068ee4738a6c65ea50465acb39269ef4cb0f775c09\":8083983,\"ddf286f84d4eb4f21371f22690cb75262a4dcc95e63b29da2a122a754e7418a1\":138153,\"e14c5e133d078ea1790ec34bd5e1e6f701fe8ffe63270b7c01a2f8e64e21a9ec\":2707844,\"f7c45a43e6072aa6ae6256d0af51b16ff4e9a4e55d697072acf176065ae2a9e3\":-1,\"e904d2358ad6fa4491ca8ed7931a359808c0502f2533bed7ccec21ac98e0cb37\":-1,\"6456420f69dc3c6a5eb793a7cf6caa6eea35b537e3be6db5bc562aa6d867eee7\":7382765,\"50de31126d3e977418fee36d9547444546fe2c4b6e2075544a71b5c2d8ff89f6\":-1,\"d28cd0b20444d405c5583314b3a9f46a94e93e0dcfaa7cabc603edca86daea0f\":232708,\"0ab7d185d9290eae37f463f20f759a0eb45424280ee6a292fd98d7101389ffa9\":2337899,\"45b15a29bb0fa049820326102f6563f9bf2f353c2b2b1253a4b14373acc95737\":-1,\"806536cc2e99b2bcaf47fe7cb812571bbbd47e8097af4f772a18abe1390babaa\":4030805,\"66745819ba3667e213e27443d1ae785d77d2f3c451f707bd0d10d827e7cf89af\":3750593,\"e2fac4d4ee30fde1facf9605dcf4d0072c5add8522da4519161d0637d65d3d36\":-1,\"84c4bcecf53c807e938b2b672e6b799796d6e3b017b4fcc06c37f7a1123fa5c1\":4921059,\"a7fffcc3c8412eff43082893122c2f7fb50b7d52e5f37b2497acf4a22bfab86f\":-1,\"3761abd4c897075f758a65da1248f549d84d7b0a158e4e4544b166c8f6af650c\":3000988,\"722bf755561d59cee0f074055b5ec3b155d14ce6e3a559aba3dd58a6943fb7cf\":3491726,\"5afbc8ef324d08f1ace180598b9195cddd8d8f21d8131cbd44b2d84d6b3f1719\":833850,\"a80711019c063fade7b34f350d807c9d2fe2a86b24b6d3804974634ad06f31a6\":4899375,\"c68abc1e32ac1b1ac8f2ac75d2885ea930facf0870308d8bf6929780b654f8ee\":5757861,\"f2d134a3d99055aec36f94d2bcc49b340404acf4c0c16e519f8744d27e842f5b\":3743417,\"0109715a4fd74645a871d3bcc79e4ee4070faca507959efd184c83c1c8190cd8\":8083980,\"80e7528eb225a100b02f567475f5db36cb50517cc9d24d1cfee2ced211ece406\":950554,\"8e90a51095abfb05e4f088b184c70691617f8c6bc8a852fe00d0101426f5ab4b\":4912010,\"cff90341d82543590ea6242034fe2c6421c2a4f550db58afc87b96759a1af1ee\":-1,\"12f538dc9085d2b0c179d981549a467a031c660a88d194a4e2c3a8f38a6ade63\":-1,\"37ec466bb50387af6ac6bd9b534885e3b6c660a85d89ff8c8e6ddf111cbaf1a2\":7828986,\"c14de594385985ecdaa8bf8da44f925dabc5de3274c5126a1e50ea3ec2c69e4a\":7829056,\"8416e19bc06192cd3863bd7650e77f623986aca8b054f325224a3874373734a0\":4656749,\"b4771439ab61be1db4d3f3d816cc4f9ac46f498488e3b74ada31f3ceefc12d92\":-1,\"7100b3693de66994278fd1b324fd09e8a513678019b9280c46a88b9a26c5f18b\":2037153,\"7e1af5f0843255cd23188bd005a9068355fd5f721bb498585b62c81b86090f3a\":9639,\"085403196c5d3fdf959ffb17d4042a7721e5c05ed957cff7163b26a7de7c2a97\":4632865,\"67d2acadc7173c9be0a9f80fc1226cc5611530a54191359c89b6fff67191d46e\":-1,\"2253df7489ce2ef90a9ab5f3e06e03775e0f88d6606d756ac8a9ab7133d27020\":2877511,\"64c27f054fc325cf6f3f23bc52d0a8e943823b32d1bf095d46d0946c42c754ac\":2975486,\"8e41e049421369f51e9c6333d044e9d5960db055b7d1798b793da1b55c29d908\":6769080,\"a3ff9ad35b8557d5f5fa4502ee86468c6d67bc62fbaf3a77b059689debe7a71a\":3695712,\"10cd696e61a31d46cbb6013f40f4bf4621ba44d11dc528df2e771ef13a151657\":5201206,\"fa00a2b3b6acec574960143347bf0cf4ab3b459ab64439ba8c765a1ced466c9b\":-1,\"83555a220da4eb3c6b16eb9c48f1947c53a1924026c10f334d291df645d78fae\":3433044,\"183ec98482b8bd9fe728d3bdbad3d3179d12cb75469b3468bad08779475fad6d\":4656757,\"4043ffbb81249888d4f4c9fab94a800790143b9637c9ef1ae9e13878751ca7df\":34861,\"c9f3151f1709a3470f0471906dfad096ccad10f40e19e144b8a5f0d9238bb621\":-1,\"069bfec5931d89a859747b53c6e8bc877f95b406f083921dc219ed6af2be25f2\":8086320,\"ec995ce3eba9fb40fafc7665e916cf2c56f5984aeff4fc2af60663a68f61c5e8\":5623181,\"350078169f08b3324f0e6c01ad2ed499b05d25924a5616790b811dd076566bf6\":3530156,\"88312d4978083d5649d9ed498d820d164ad51888148b9afe13b3eb7a17a70bff\":-1,\"528a630b43f5d1eeea5b4567e87c7f7f3d4b86046b8a3d079ef0b9a1aea64360\":7865610,\"e75b9bfe6f8e6e6d9eba53a35870d281e0c0ef305de5e20bd4b24da8a6960e03\":4837208,\"09d583ea6d26b8c41f0f023fbfdd3b438948f6db499fdd27edefc6db1b41f09c\":7847259,\"d11d29e38b3db75aec0ebb69dc66eb4f6276d0a1d9c7faa6a4fa33b699637447\":8084009,\"00083bd80ba724fa48bf96a6a2f8ca9798a825d65fd5ee1e738915e5d4ec605d\":700634,\"54b0cf55b3094ebc9d657694b691c9fa3e40090e9c26c98df60bee3b3ff3e32f\":749996,\"ab5b6efb0828ca75fbf77401a42163385cbfff0a415bf914c02bb8b647f4fd08\":2898515,\"ba23747f7a7787946c072260abe0d67d0d4d8bdb357041f64134e16542968b5c\":6923768,\"13f47469cf168f2882460ad69bf200e3ec6bb559c0581a335c5dfd0479795330\":7341895,\"3d5e3c172a95af0afe8bea7b1073c7c0ba7a175b2ef27496e68bf7c9095230a9\":-1,\"650c4d1e71201de962a0d1a5ed970111e1aaca6799744f851f56abe9a2344795\":2623488,\"9a051b9780ee57a0e6895ea87adb4df3129c0542eb81e6a575659a061622fc68\":4177120,\"b3006daa6d1b3300efaf143ca6e9ce049b5ee29a63ba1b40071045b152164733\":5874048,\"3d12e3912d9a98dba007ba1c94b4e214db5598c0bc64ccfc72817c2674d13cec\":292904,\"04fd63142d06e479081b4a1ef52140a35b81e22ac7d9bf33c853917d1c39fc76\":3493325,\"9f6f046eb495ce65626f2ae6598e9b92db8d855bc59e09da384bac6571ca97ac\":13066,\"9f1dabb4d4364c74fc13ee2a6765c8d9de72610bee7b42cf57e619714fc0d420\":624734,\"0f93accc9467da57f95f306f40008900506bbe97776e20a181051b9f3f061f6b\":4685300,\"75b4c5f64e26a281b40cf03a8a20faa1d9fe49a08429c087e48fadd3907f77fc\":5337,\"8f5b371f0bd4b2bd362495d9e187578c13aaddf131348381a4653b7aff9c40ac\":-1,\"bbe0e239f698dbd7f310d5ed33701349220d8f1549316a1981436d19658c99ac\":1786654,\"93fd741cdf0d7467e225647e33a6eceb07cf1a533426c10569446d0ed1c4f27a\":7793857,\"e95847cddb7ece78cbd053104f54f01b369c0f1d6b9c68524a4ae09ae786e4e5\":3760733,\"bea91e9a3a9936935ffc30154c3f68da6f503ffa056e0c8f81d07fdaba9e0bb5\":3501596,\"58ee8a6af121f183d496b720812e116fae23856e942c48c1308d13302603b1f6\":541095,\"c2f46534b09b8ca5cb821d6fc67662f51eaecd3f697fea18ddb6f432bd64b368\":3721499,\"2eea13501505921c21e7080d4bc3a3edd818e2bda954c38321ba122c1a405681\":72767,\"cb2a1e44981be7aa5da8779429fdf3f9195919c8ecc429d3a21cdd76a9753748\":5072071,\"d327dd4196a7757b3cfa0d1572588f9ef78e5faa803e8d2e374d9e0b12292272\":4321174,\"9480f17720ecf3ca0297f8ce1da760248a9769e06de27862b7a7528aa9266001\":833852,\"abd09e8c695349a5fa900dd4b0b87bb7e0abee39f484583adabf441d875ea925\":-1,\"b5f5a672854adb8740410b8478ee49b0b0d163f10ecbccd5a38331a9c05be6c5\":3343275,\"b0b89c60d52fc60f28d15bd180d7f573c6127e52b3a7e71643b5723928e6b06d\":2351228,\"3cf82ba4edfba839006e7c126d1448ba6ddc422d623eb4f965b1b7e597f3ef52\":3241577,\"b9762a525810508af79c353dc8e98ea4f578fba03e560cf39280919f31b7f5b5\":3095744,\"6661f2852dcbf982180420bb5d5981f82d79f0c3f8bef3f4c08c526724aa6c29\":-1,\"5449783c44da63ec15158f855bded1b68de5685a7c0b8a3c664ac3701d2487f5\":7793880,\"704854d076decc8648b3842951761a1887ee87e28a21c42cc2f6589cce95aa86\":-1,\"b5d5c97138c3a7243f7f7a61b78d3a6efdd538f937ba499fe69cf16075fb91df\":749949,\"02c8cd22705ec00d18d563faaf389db174f93f72485af4f91a4227933161e3b3\":-1,\"f0a1918e40b85766da7a8685d6c943bbb70640161e860fef238d4353b1947c70\":833745,\"ff9b4f41c4f42585b4dbb356d411e460b47f2cd06694adf3e951ae1470df8aa7\":7865676,\"475cffbfdb7fe5a8f6ab210eec5af321a42c824541685cd2e37d8e8cecb3f067\":-1,\"48b165ea23f068e0768f77755db2a9923195007e45a9a52459a197d0be50cd35\":-1,\"6a76a09fc72afe55b17497bd10d62c848fcdd2e3de7e618ca8cde8cb1376d268\":4753269,\"bf1037df242bf024d84e85c5a5091583311ce4273d933226aa471bb1e46ded61\":4880516,\"9b02c1082270a74f8f45bd2a067ff584e4d65da6f13135b4190d6e9153c85727\":2707848,\"86ece135979040050022f64ceb7b8a1c81438828f8ce74432f3c597a3d93eedd\":-1,\"8a13314b1029147355517daf8a634010a8b1aac4f8deec095dc166674698b594\":833658,\"3ac8fefbe06e17c11109b13a7bba91b6f4baf9700343a56f7eeb9dcb76456c1e\":7793886,\"4d0c277bbc654d4f518f918678cdd7bd67538709236d45a913b36c1f79469578\":7192325,\"a392e9b7628d4d5368c2c8ec7db2243de7afbb4def2fdaea2bfaa2a8f056bcae\":-1,\"3b5057a020cfff8d4befbe3e7e285f64474ecc877076d0f84df9c30aa2ad8e39\":833785,\"5605cc6a4f0d9d967352da9a34cfc4c2f7e00f640d123bdc8f5ab37374db9ad2\":913939,\"693c2a5348380e164a0c7cc922e0355c688d649de73bd8f752a15efca564f29d\":5101962,\"cfd3a2ab55b9600228ec9e8da00dfbde47d683abf5cc150a930d868b10cf0935\":5425120,\"16b1492330cce90433014e2fb2c0f75d60032227d2184c040902ccd5b330603c\":4155658,\"7e334e32f3ec4a9e6aeb3811cc4ae0cfcdd40300063ef879a380656aff2b72d4\":3726054,\"9de5d3648192966df236a3f0ea71bd62a01e2be9f4b0763be4fbd47e9f4abb09\":2898512,\"9e2a731ed92c311b5252ee54fb080b4f71b23944a8579b62d7526791739e362b\":833804,\"523c0736e86f150f060453dd70bc110c6ddf7ac1624c422c0d6ea431d98fb7b2\":5072297,\"a6fa1113c2ca4165f2a7d91d7cf8c140fd461fb5ac74d1b07ea25f2d56661578\":2770664,\"b8c271c63485172a8133274a958e87dd348e5d7027041ec3db3cc1cf103e5c14\":-1,\"d17f77b737cb3ebfb9c50c97263cc2b6040cc94199d5a3269cb2b08a4f3e8ce7\":-1,\"8b5984fe53024872ba05403842da03b5c881c2ec401fd1b6a5309241a303b4be\":2895056,\"836d1b70be6d036bea93e213b6e101eeacde05560238720fb2826113119b4ee0\":5358094,\"cc1b60c282d297f4431c283bc88615f8d70f81e065405d0d8448190620032a91\":8084063,\"c97e8dec7cb4a3cca5268dae34b63007cfc918f80fa8ee4d8841ceaaf8eb61ac\":8083924,\"031e2aaf0fadf9e3ed9d207acc4181cd575f9be9d78c99ad65da15abc2ca1196\":3290738,\"bc46eee9ef2a29156d45da5f6d20afc6b4553f95364b8f45af97eab273c5a441\":1808690,\"46c5fe249c84f50286c6636b5bc089626eb9906e68ffc5c53ee2f168eea86b65\":-1,\"90dd89b68c85cffa62284277f1c76d64dc50301509a36be6fc103f3688d227e1\":3329414,\"953404b032e8940f7c0f50e4c5e459fe1bd9fc5d2d5c8e7dc49830c2ea38928c\":8083978,\"165ce741856789b91551a734efb687e48a6d796f98692bef78c7c9cfcdf42593\":2287167,\"429c66d36c448bcfb48fb37c5025879d2f221c34e9ad8396be3d389eac4e8bd5\":4336772,\"ad41a5c39e2b5d68e0fe6a4a94adae88d0dfc8100c91394fe4e67182a4664b44\":8084046,\"3e729a0c67cdca578a561f81f3bba9330e30164eac10a1e397839a370a2a2d73\":-1,\"fe0ef332bbdb4fc831d46d1c1b53b18803851d99c7d9af9206add5dcb34f9d33\":4598844,\"816c175d76ae953d1838ad108bded206381fae97818c8a0a26265f29e707e7e6\":5072077,\"540e58834a45c29d64762a381b25f8645755234084cf955f32aea820025eeea0\":-1,\"9dcf66d03b0d977b8f1675b148c198dcb95c11635aa62990ab49f770add990e8\":1991747,\"ea853402147ddb5ac81b83d30859ed651015681949a37784531526e377dcf802\":8083957,\"078a5ba8dcc87da4ef7fec7487be131e8804a9c05204d82d37c57458f13b3879\":3684095,\"6774b068fe17cf99fec1a027b97fa151b0a74b4254fb27701bdf158d7a890e9f\":7346300,\"b82b107e9220890e2338ec8565b12a422f8470fc38cbada8092fcee323ae85a7\":-1,\"75e5a689734cefc7ec9cbd41d9ee4bfe904565f1c697bb29157131fb746e4f6f\":14018,\"2206c926cf51f2f66bd5839a99288283582e6e7ea4b38d9af76be76e254fec38\":2922324,\"1f36c575a572373e87d0ace7e441423d92967336cf0e44b81e371672ba195f12\":5907,\"8153abd0f5a7057aebc71b7342acf0ba3b98f245a6e0a59eaca167c6c3282db8\":478792,\"3b0c266dced326279da4817c081e48b86257502a369851cfe305b862f2d798af\":8083923,\"80529a04fae3a91bdb45bd4a81af0991d7ac177c4ac41721ee57a6668ed6f2d8\":750030,\"9cd8230cced260bffe4753edfb0fc5752bc8d5258f1cc04885ce6bed8277af83\":288563,\"e46239361f3b4e95ee96b7990b0ed7be555aecb188ff1236d4262d60c8f85d81\":2040491,\"325ac3cd5c008dca3bd2c52652dfef56f7cf3c51c135b40642b9395bcc10923a\":3816442,\"937d72fa7adbfdc221de959b6037052b9515f53e5d7e8eb5d1784597f5cb5f61\":8083973,\"0a8d1ddf603156f31d47a32361e0eebb5b45f5a70b12676e5715e98555426a70\":-1,\"7e082ec143e76a0b3030e3a651a3fd9c37c86219e84d3c6b48c2edf6ca4e02ac\":1921943,\"1976212fa81e2c03a2931efbb8469dd34b1ee1a131ece59db7680dbf63d90a40\":-1,\"64e56f2df275dcde241d0fbe5fbb106ab31aeaf96a794298272e8987d12cab6c\":2604497,\"82ce0fa60a863dfe7a54fa6ac45a973e4a877a3ac511cfcb70c5f46c829e43a0\":3508276,\"0c626e71b323e7304aa53b8fe20a70eba715e4189b2ce14a7170fc3e0c896495\":7828978,\"01d11fd5da7e68ce8b6b67ea5b8076c1e45d9674f73e6fbe2f5efcef3b10ac94\":3252118,\"b9ae30b06d19d1740ac734c5284cb4a8eee6d2d0684684a0af234c03cff6e6bc\":3242524,\"7e0c09bb9f4d96d60cf57f8b341e4a7eed40ad58a301da050595e9ce40d7edf5\":5542111,\"f5f45c27d3a2a01e5cb13c3d1139229b370a5fc801c9dcf5fbbc683c8e4949cb\":7828988,\"4944f655255a3524cf9fc4c1171633ce00f0ca7e08fb50c2df5b92fecf744484\":-1,\"9823704c52511aa96bc73cf470c0e232521b3360f10edb4c504ca4ac59aff7b7\":339510,\"35070de808e9500a9f8c5b13dc1e390552f8ba70d17fc774b9836adaaab1363f\":4055460,\"d3a29a431fbfb348c006253651f403dbce53715a35422ed639ae6778ed5f1cf0\":1751107,\"c4b71f7b8f967c61382c042ee7fbfb7394ef1f1f23d5ee7982ba876306026e05\":8083940,\"360d72af0f8df855042b57ba3ce260cc5a81b73adc367b3dc51009f8841b8201\":3795189,\"82ae05d3ad400267ba3f3fb6c4ccc9a8c407a561cd641e7316ae5cd3fa2d3062\":4440196,\"c2b3a1e74741e3ca9d13c953d124758f567645ccc8513bd407aea4ecacfd3989\":5316396,\"2e5cb2b2fc3acce78f1d6d71ae1b18f4b58bf153bc3cc537b7fdd3667fd369be\":3688267,\"ad2ad7bc2f5f002bf58a607f1ba3cb4cbb951d1df9a882ad9b68d76618838e7d\":2676765,\"7ff79459681f2afee3b4ac7daf4c22874d9cc888a34d7017a4cc7a6e337c6e84\":3227624,\"9f4c39055039444e7f634e44499f970f320132cfe9605e09309988ac2fc28094\":2776670,\"63715c2f1a083de2525cfde965ed2fb29c4e7426420fb0bc0971a713f44249c6\":3109141,\"6f072b5be4ad3a48636d9c0fa9e2d7b1eedefc8db626abebd90fe2d0a26e7435\":22111,\"3148b573cfdc5e815b9d33932d362ace48367f7cd7195cd10f3c0ef7b77ffbcc\":1605455,\"6cb5d9f8b0c5026d6682a68c52fbb9fc32e548432afcc26239ac30cfe0e21b59\":-1,\"e206f77ef92a6e98f3a292206e5e4f94c45e13c8f5fb0576bbbd4d3f82fc2477\":3462654,\"a27170a4ad246758cc7fb45ded14b065f6a1919836a2bba34e6dcd9335a054da\":8083986,\"a88e9aed8df0b6dcf02ce1b5c1432ea516933adf4bc7e0ef83a8680e39543d6e\":-1,\"613585d1e41897e2c6b979b643cfdaccae88827c17ce50a45f74bcebef18924f\":3795206,\"e970696bbd7e5e8efa19d3740a2a3eece1e884eaaf7ac76140506d111283e41a\":2895957,\"62a2e1272ba756395d89a5d36eed66c2a0c32ed4a17a00819c73a02417a93b00\":3730061,\"ef0328719d32241fd94d4f2f0da9d3b15b03162127532262c1efd67282e60408\":2137965,\"fe882bab3ee2ab8a615cb83bf849d6c5f4417f12311d0929cb5e86b9c07c133d\":2899027,\"a664028121c815e04c8683f05453e623fae96027d202ff9d59a9cc16d6456faf\":4656752,\"aec481569c30c27158b4b7b26f3b66581ae176f1f31947048d27993a31ab29d1\":1808871,\"b86c3d5db9c89c3cd69ea6c033c60e09e6610a50612f8275d3e011c44865426b\":2683650,\"db09019795bf3303483a39fb3a2e096bc1da58e260dbef160377a4841386e548\":-1,\"04f0967af6f7b812e8a079120e68e7cb50437bb9bfdf82cdf25149ed13580a48\":441549,\"82f076999d44d564dcb2b1d401c4743c949d71d3bf13f0e316af52f2c1f990b2\":-1,\"4633c3d532678821d904b39c9273f723ce39593601c912fdca3e4e74f1bffe05\":3286410,\"9b00ce6acb8e3fc94857c3d99f9dc522d41014ab6c863fcd2b1c5bfea18cd4b7\":5072296,\"4545f4368678fd74f5ae0c9b994ba99a63cf75c5c2797131a54d422ea44a6e0e\":7573222,\"08c30061df62af735b4f0ff878dedc731bf14decff71849fa02ab70ce7595620\":-1,\"d525ba3f345f69bff3307e4ffae678c2e5d02793c87108c4336067f241256909\":700751,\"d8fa932d9b68e4ff75d340d5fc755314031f401b16d6f6bdece558fbc21ab6f4\":78457,\"9c112f4d8ccd5cb3b881e34f98b78a06026aef143f10b57c6884f0654cc08337\":3501606,\"bb04d4cf3c4d718587d65cb10396863a1d652b939b24ca0eea916d16054c55b0\":-1,\"42bc5c175add6ab7bd8e4466df540cfa91b6c4c971f4bdb47e2be600832d80b7\":978303,\"54d94802bc8c25ff881e89de9ef8e0b01cabdc48be66a1299a628b9693049797\":-1,\"3ec06de92c074e4bf59a852f93ccce65bee8e80ff4c17a09d083254c0067f38a\":1432663,\"a4854eb4c80f85c72bdc86ecf7e2d1696b43ad270e9fe4e839d3397674586c94\":8083932,\"f2b6ce1712a917778fb23cbc4a3cc1aafd047a1500f35c0c5ca5b5632e6ec1bb\":7828984,\"b4cc30c0684e546ad765c6dc52be978353b627842311b14f115aac0cecf92b20\":-1,\"71d2c5bc0e72ee79a6f0b8f398b593f33959a97f376a170c316235b50aaeda89\":7484497,\"d3b4db323aacf968a65c72edcb1453cdfb3044b645d953c6bfe2030d86c8b4a6\":4249597,\"a87c1d508f92e6eb6cf698392f75f24a34c70efd319fd09968f520e101af62ed\":3295789,\"eef27d0d22fd412a5057ec9d063020cd4b2a53f1d97285b358243fc07b398e6d\":833711,\"f65a244ae69ef8930e0cf0ce105a287da0b611a360247753c5154a92a4c00494\":1388210,\"72efeb310c0186f792c98a04d7f05856068a91f8c94e4949978d9059dab29b20\":49677,\"54b0d4b87f6150a221004d46becb2ffbdce26678848741c5e991efebbea575c1\":833846,\"2cd33e37c1ccceb7dfe1f9c420b6082292ad32fbc5e9b3a57bb4c8125330912c\":4851930,\"ab469f45ab7b05c608a00f5c267c5fed1d774a3af91408cf2679242d13cb9c04\":2355005,\"d65a408e3a822cfe1c6ec3738d51fe2c480d65c2e786f8de71b49c87e108e645\":5529473,\"68a22e0cd8b72dbfed95e5208d6c09f64e1a187504007ae5aaf16eb3bef377b9\":3245662,\"0a30002ca3f516bdad9063d9a6612ce96f545a0125fa925a1b0d1c43a5ef48ac\":-1,\"ac5ddd1f6d9277c6e3aa4eb7c43ba6e39758aea25b7e172816ea65fae1102559\":2896167,\"a17ecf014e43fd70a0be61f903f2d13178bc18e0f8f5f3aab89dc0e74527543b\":7484963,\"03cf80620300eb5942e2c8458f541bfb90ae383e2c180235249f88aa0165ca4f\":7865559,\"476d63ca6ab86e564e3ecc1187ecd22df3ef17ae64b84a59360e59421b9e756a\":1046344,\"49b2d771708c0f19896f3d99f8a5a813c711e3c72218129e066937c454c31e04\":-1,\"ea563fe0f82ca4eaf1b7b77b6500eb6339828249af3026095bd01e3ed8eef81e\":900053,\"d3663ac353e0b845c625284c86e294c5c7a56f0abfd85a67121ed65ae7f2b4a3\":3196013,\"17f71300f5f896ccdf3ad8b5d59e6984b2f7e4751e1a954a3c22b09d3f35a9fb\":-1,\"1a78650022f906efc151afc71902cb587b99455514a0802a49017eedcc64eecd\":7933240,\"26fc91c0b350cd5a708c3314157641b54c8621f31bb80cf008f563ad4e5febcc\":3685217,\"0da9e55f51a3af2872e79108a89edf897e40206eb5775a413c4bb04c49e2ff35\":833825,\"9a84bfaca5904ed5c3842ea1d62aaa795efa6059008b932b0485644e0378662e\":3245873,\"52ae608e4696d0ad11a42a89401f0e77c5302fcefd1f047d9bd358902e86971b\":8083948,\"6c5143d38d22313d3a586bb6a4228aa4547db5f75c2491ef6985b3a91a507cff\":8083925,\"f48eaf365c681cf0656f4ceeec65478cff6df6fb55fe009c6013219ec91c5da9\":-1,\"fa3fe8b4bd4f6825a287379ae147e62540ec9bb65ab46298e3ba937616afe85a\":8083971,\"6362e76636863df4f972a1a1d483740ed5c1872c3fa582b40c43bbcf6a99be2e\":8084031,\"078bb7f24e157f176fbeefee2023833e1127016b68282338c9a07dcd948afd43\":3443739,\"0d185a0a8aa0b051a8d04263f1123a2bc1121f328b775c3d1fcea7ec6dd4a6ce\":-1,\"d72a0e33f231255f64810efd4eee43922415c497d4261f2981f7e8ddf71d42a7\":87129,\"ad82dc5237378a39abb3bbd8174ac0f77c882573a02c8fac01b4c7a058a96d90\":8083892,\"f5f8456641df2863fb7850e1cd3a18aadadc761e236f00f24b860b21d15eb681\":1917674,\"3cd6673d45e3c45acdf668eb8f3db48d2e600e559d19e9dc4a76f91c2f59fe8b\":8084016,\"da21fcf1dcad0f54f7a141fb4559b5e684be4d683f37fa7efffee8a93fe5ae7e\":1070202,\"3a04a26751675c1ebf9d3a88bf9c39b8f2e304fe83a1519bd8fefaa3c94df828\":2896165,\"925c979a6ee26d6fa3be39319f2e8c7b26becedb89e50199182072a828444599\":4755925,\"87d336bcbba8af52ca239aa4d1a6cf280e23b1c5c3b861df08028a275ec3a218\":7921713,\"89e11132cf82fdee2700a3c8ea9dfcf6fc22dbdadee199adff19b110f67f0d98\":6985682,\"f08161e61c1174610f898f70dad9331f90d393c5657ceb6bd0a0e21e39c24225\":-1,\"f9ce0ddec53cc1ee7cb8d2b76b4525b8bff835dd32fb51e57d321d176827becb\":-1,\"2df34a41c3a5adf6215bcf87990549968e942904c24aff03d0517f43846c9d64\":5025631,\"660226cb99e9e96982fb1f529ba2e7b5da08e204b055bce1a816d65696f8732c\":2975557,\"b2913d1434ba2ca69eaf079c4a7e295c5a43e771f91f8b949027932c6aafdb27\":4278360,\"f72085fa1d746563135eb5aa3d9a8dc9829021c105c8d23f45c55cfc9c7b7c75\":1939024,\"1b5bb95f64c564cab772d43ee5ae2d57a0acecefa134b0adb21bd87ca8d1c9c3\":8083948,\"7df712d6c9dfc0ed42e74e3f8cd80755e46ae8db441557d5adf0bd2607d5ce56\":6449211,\"222298a9236b4e589b71ab3252bf1d371eb4a0b75bc1211775901c9919fe3103\":8083974,\"3c4efd9e65f2bcae52d8bb158d08d2af6113dca4725ed05225c4399fb41e9752\":4575663}");
        RocksDBService.init("/Users/niels/Downloads/testspace/cs81");
        List<byte[]> list2 = RocksDBService.valueList("consensus_agent1");
        for (byte[] arr : list2) {
            AgentPo po = new AgentPo();
            po.parse(arr, 0);
            Long deleteHeight = Long.parseLong("" + map.get(po.getHash().toHex()));
            if (po.getDelHeight() != deleteHeight) {
                System.out.println(po.getHash().toHex() + "---ln: " + po.getDelHeight() + "                      ---04： " + deleteHeight);
            }
        }


    }
}
